using System;
using System.Collections.Generic;

namespace App.SolInf.Controlador
{
    public static class ExtensionesMetodosEstaticos
    {
        static Random random = new Random();

        public static T GetRandom<T>(this IList<T> list)
        {
            if (list.Count == 0)
                return default(T);
            else
                return list[random.Next(0, list.Count)];
        }


    }
}